import dayjs from "dayjs";
import { createSlice } from "@reduxjs/toolkit";

const timerSlice = createSlice({
    name: "timer",
    initialState: {
        time: dayjs().format("YYYY/MM/DD HH:mm:ss"),
    },
    reducers: {
        setTime: (state) => {
            state.time = dayjs().format("YYYY/MM/DD HH:mm:ss");
        },
    },
});
export const { setTime } = timerSlice.actions;
export default timerSlice.reducer;
